import java.util.Timer;
import java.util.Scanner;

//from book Benmammar exercise 5 pages 132 + 29 .. 32

public class TableOf7Main {

public static void main(String[] args) {
// TODO Auto-generated method stub
TableOf7Task t7= new TableOf7Task();
String response = "y";
Timer timer= new Timer();
timer.schedule(t7,2000,4000);// with period 4 sec
Scanner myObj = new Scanner(System.in);
try {
while(response.equals("y")) {;
System.out.println("Do you still want to see Table of 7?
(y/n)");
response = myObj.nextLine();
}
}finally {myObj.close(); }
timer.cancel();
}//end main

}// end class TableOf7Main